import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
from moveit_configs_utils import MoveItConfigsBuilder



def generate_launch_description():
    moveit_config = (MoveItConfigsBuilder("so_arm", package_name="scepter_moveit_config")
                     .robot_description(file_path="config/so_arm.urdf.xacro")
                     .to_moveit_configs())

    node = Node(
        package="scepter_agent",
        executable="scepter_agent_multi",
        output="screen",
        parameters=[
            moveit_config.robot_description,
            moveit_config.robot_description_semantic,
            moveit_config.robot_description_kinematics,
            moveit_config.joint_limits,
            moveit_config.planning_pipelines,
        ],
    )

    return LaunchDescription([node])





















